import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import TypeNav from './components/TypeNav'
import Pagination from '@/components/Pagination'
import Dialog from '@/components/Dialog'

import 'swiper/css/swiper.min.css'

import '@/mockServer'
// 引入图片懒加载
import VueLazyload from 'vue-lazyload'
// 按需引入
import { Button, Row,Message } from 'element-ui';
// 注册为全局组件
Vue.component(Button.name, Button);
Vue.component(Row.name, Row);

Vue.prototype.$message = Message;


Vue.config.productionTip = false

// 设置图片懒加载
import loadimage from '@/assets/loading.gif'

Vue.use(VueLazyload, {
  // preLoad: 1.3,
  loading: loadimage,
})

//全局注册TypeNav，

Vue.component(TypeNav.name,TypeNav)
// 分页的
Vue.component(Pagination.name,Pagination)
// 对话框
Vue.component(Dialog.name,Dialog)
new Vue({
  render: h => h(App),
  beforeCreate(){
    Vue.prototype.$bus = this
  },
  router,
  store
}).$mount('#app')
